#include<bits/stdc++.h>
#define int long long
using namespace std;
const int N = 1e5 + 10;
const int Mod = 998244353;
int a[N], d[N], t[N], g[N];
int n, m, K, S, ans;
vector<int>v[N];
bool check(int x, int fa) {
	bool fl = 1;
	for(int i = 0; i < v[x].size(); i++) {
		int y = v[x][i];
		if(y == fa) continue;
		if(d[y] == d[x]) return false;
		fl &= check(y, x);
	}
	return fl;
}
int ksm(int x, int y) {
	int res = 1, pw = x;
	while(y) {
		if(y % 2) res = res * pw % Mod;
		pw = pw * pw % Mod;
		y /= 2;
	}
	return res;
}
void dfs(int x) {
	if(x == n + 1) {
		if(check(1, 0)) {
			int cnt = 0;
			for(int i = 1; i <= m; i++) t[i] = 0;
			for(int i = 1; i <= S; i++) {
				if(!t[d[a[i]]]) ++cnt;
				t[d[a[i]]]++;
			}
			g[cnt]++;
			ans = (ans + ksm(cnt, K)) % Mod;
		}
		return;
	}
	for(int i = 1; i <= m; i++) {
		d[x] = i;
		dfs(x + 1);
	}
}
signed main() {
	freopen("tree.in", "r", stdin);
	freopen("tree.out", "w", stdout);
	ios::sync_with_stdio(0);
	cin.tie(0);
	cout.tie(0);
	
	cin >> n >> m >> K >> S;
	for(int i = 1; i <= S; i++) cin >> a[i]; 
	for(int i = 1; i < n; i++) {
		int x, y;
		cin >> x >> y;
		v[x].push_back(y);
		v[y].push_back(x);
	}
	dfs(1);
	cout << ans;
	return 0;
}
/*
4 3 1 2
1 3
1 2
2 3
1 4
*/
